﻿using System;
using System.ServiceModel.Activation;
using System.Web;
using System.Web.Routing;
using Neptuno.Service.Security;

namespace Neptuno.Service
{
    public class Global : HttpApplication
    {
        void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes();
        }

        private void RegisterRoutes()
        {
            // Edit the base address of Service1 by replacing the "Service1" string below
            RouteTable.Routes.Add(new ServiceRoute("Service1", new WebServiceHostFactory(), typeof(Service1)));
            RouteTable.Routes.Add(new ServiceRoute("Lineas", new NeptunoServiceFactory(), typeof(LineasService)));
            RouteTable.Routes.Add(new ServiceRoute("Buques", new NeptunoServiceFactory(), typeof(BuquesService)));
            RouteTable.Routes.Add(new ServiceRoute("Recaladas", new NeptunoServiceFactory(), typeof(RecaladasService)));
            RouteTable.Routes.Add(new ServiceRoute("Terminales", new NeptunoServiceFactory(), typeof(TerminalesService)));
            RouteTable.Routes.Add(new ServiceRoute("Puertos", new NeptunoServiceFactory(), typeof(PuertosService)));
            RouteTable.Routes.Add(new ServiceRoute("Paises", new NeptunoServiceFactory(), typeof(PaisesService)));
            RouteTable.Routes.Add(new ServiceRoute("Usuarios", new NeptunoServiceFactory(), typeof(UsuariosService)));
            RouteTable.Routes.Add(new ServiceRoute("TiposRegistros", new NeptunoServiceFactory(), typeof(TiposRegistrosService)));
            RouteTable.Routes.Add(new ServiceRoute("Autenticacion", new WebServiceHostFactory(), typeof(AutenticacionService)));
        }
    }
}
